package znet

import "zinx-learn/ziface"

// Request
type Request struct {
	conn ziface.IConnection
	msg  ziface.IMessage
}

func (r *Request) GetMessageID() uint32 {
	return r.msg.GetMsgId()
}

func (r *Request) GetConnection() ziface.IConnection {
	return r.conn
}

func (r *Request) GetMessage() ziface.IMessage {
	return r.msg
}

func NewRequest(connection ziface.IConnection, message ziface.IMessage) *Request {
	return &Request{
		conn: connection,
		msg:  message,
	}
}
